﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vtron.LEDCorrective.EDSDKWrapper
{
    public class Camera
    {
        internal IntPtr Ref;
        public EDSDK.EdsDeviceInfo Info { get; private set; }

        public uint Error
        {
            get { return EDSDK.EDS_ERR_OK; }
            set { if (value != EDSDK.EDS_ERR_OK) throw new Exception("SDK Error: " + value); }
        }

        public Camera(IntPtr Reference)
        {
            if (Reference == IntPtr.Zero) throw new ArgumentNullException("Camera pointer is zero");
            this.Ref = Reference;
            EDSDK.EdsDeviceInfo dinfo;
            Error = EDSDK.EdsGetDeviceInfo(Reference, out dinfo);
            this.Info = dinfo;
        }
    }
}
